package com.test.multithread.future;

import java.util.function.Consumer;

class ConDemo3 {
    private static void con(Consumer<String> one, Consumer<String> two) {
        one.andThen(two).accept("Hello Java");
    }

    public static void main(String[] args) {
        con(
                (s) -> System.out.println(s.toLowerCase()),
                (s) -> System.out.println(s.toUpperCase())
        );
    }
}
